#!/usr/bin/perl -w


%defs=();
open(FD,"defines");

while (<FD>) {
    chomp;
    if ($_=~/^#define (RFM23_(..)_.+?) +?.+?$/) {
    $defs{$2}=$1;
    }
}

close(FD);
printf("\n\n");
while (<>) {
    chomp;
    if ($_=~/([\w\d]{2})[ \t]+([\w\d]{2})/) {
	printf("{%s, 0x%s},\n",$defs{uc($1)},$2);
    }
}
printf("\n\n");

